package com.example.chessbattleplatform.web.chess_rooms.Pojo.dto;

import com.example.chessbattleplatform.web.chess_rooms.Pojo.Enum.RoomTypeEnum;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@AllArgsConstructor
@NoArgsConstructor
@Data
public class RoomsDto {
    // 房间名称
    @NotNull(message = "房间名称为空")
    @Size(min = 1, max = 20, message = "房间名称需在1-20字符之间")
    private String name;

    // 房间类型，默认值为 'public' 公开房间 private 私密房间
    // 设置 默认值 如果 有值 会复值
    private RoomTypeEnum type = RoomTypeEnum.PUBLIC;

    //房间密码
    // 默认值为 123456
    @NotNull(message = "房间密码为空")
    @Size(min = 6, max = 20, message = "房间密码长度需在6-20字符之间")
    private String password = "123456";
}
